home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 10255 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.4 KB

  1. Path: keats.ugrad.cs.ubc.ca!not-for-mail
  2. From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
  3. Newsgroups: comp.lang.c,comp.os.msdos.programmer,comp.periphs.printers
  4. Subject: Re: rotating text for printing
  5. Date: 15 Mar 1996 20:53:53 -0800
  6. Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
  7. Distribution: inet
  8. Message-ID: <4idhh1INNpk0@keats.ugrad.cs.ubc.ca>
  9. References: <1996Mar15.225750.2705@ticipa.works.ti.com>
  10. NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
  11.  
  12. In article <1996Mar15.225750.2705@ticipa.works.ti.com>,
  13. Kevin Badinger <kbad@ticipa.works.ti.com> wrote:
  14.  >Can anyone give me, or point me in the direction to finding information on
  15.  >how to rotate text in C so I can print it in a landscape format for old epson
  16.  >printers from dos.  I know the newer printers will do all the landscape
  17.  >formatting for you, but unfortunately I have to print to the old epsons.  
  18.  
  19. There is no easy way to do this in the C language. You have to write a program
  20. of moderate complexity.
  21.  
  22. When I was a kid, I made a user interface program in BASIC that let the user
  23. create and upload his own EPSON fonts for the MX/FX series. The bit patterns
  24. were defined using special escape sequences sent to the printer.
  25.  
  26. What you could do is define your own "sideways" character set, and then store
  27. an entire page of text in a big character array which you then print in the
  28. right traversal order so that the text reads properly sideways.
  29.  
  30. These printers can be put into a graphics mode where instead of interpreting
  31. incoming characters as indices into a table of fonts, they interpret the data
  32. directly as a bit pattern to drive the pins of the print head. There are some
  33. restrictions. I think that you can't fire the same pin twice in adjacent
  34. columns, for instance---the same has to be observed in the font definition
  35. matrices.
  36.  
  37. If you are adventurous, you could write a driver which would let you typeset
  38. arbitrary text into a buffer using all kinds of fonts of your own invention,
  39. and then print it as a bitmap. Or perhaps write something that causes a
  40. well-known bitmap file format to print. If you manage to thus convert a format
  41. that is generated by ghostscript, you may even end up being able to print
  42. PostScript stuff. Ha ha. That would be a neat hack, indeed.
  43.  
  44.  >Any information that you can provide will be of great assistance.
  45.  
  46. If you have the reference manuals which tell you what the escape sequences
  47. are, you should be able to hack out something!
  48. -- 
  49.  
  50.